package com.erp.erp_servers.ShipmentPlan;

import com.erp.erp_entitys.Purchase.ExportVo;
import com.erp.erp_entitys.Purchase.PurchaseProductVO;
import com.erp.erp_entitys.ShipmentPlan.ShipmentPlanProduct;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface IShipmentPlanProductService {
    int deleteByPrimaryKey(Integer id,String type);

    int insert(ShipmentPlanProduct record);

    int insertSelective(ShipmentPlanProduct record);

    ShipmentPlanProduct selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ShipmentPlanProduct record);

    int updateByPrimaryKey(ShipmentPlanProduct record);

    List<ShipmentPlanProduct> selectProductBySpId(Integer spId);

    List<ShipmentPlanProduct> selectProductByShipmentPlanId(Integer spId);

    int deleteByIdList(@Param("idList") List<Integer> idList);

    PageInfo<ExportVo> selectExportByList(ExportVo vo);

    PageInfo<ShipmentPlanProduct> selectExportProductByExIds(@Param("idList") List<Integer> idList);

    /**
     * 根据外销合同号查询采购合同
     * @param salesContractNo
     * @return
     */
    List<PurchaseProductVO> getPurchaseByExportContractNo(String salesContractNo);

    Map<String, Object> selectShipmentByCode(String code);
}